package com.semac.client.rpc;

import java.util.ArrayList;

import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;
import com.semac.shared.exceptions.RPCExceptions;
import com.semac.shared.model.Pessoa;

@RemoteServiceRelativePath("PessoaRPCServices")
public interface PessoaRPCServices extends RemoteService {
	/**
	 * Utility class for simplifying access to the instance of async service.
	 */
	public static class Util {
		private static PessoaRPCServicesAsync instance;
		public static PessoaRPCServicesAsync getInstance(){
			if (instance == null) {
				instance = GWT.create(PessoaRPCServices.class);
			}
			return instance;
		}
	}
	
	public int cadastraPessoa(Pessoa pessoa) throws RPCExceptions;
	
	public int updatePessoa(Pessoa pessoa) throws RPCExceptions;

	ArrayList<Pessoa> getPossiveisMinistrantes() throws RPCExceptions;
	
}
